package com.ruoyi.factorydata.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.*;

import java.util.Date;
import java.util.List;

/**
 * 入库单信息对象 inventory_receipt_info
 *
 * @author ruoyi
 * @date 2025-07-21
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(resultMap = "com.ruoyi.factorydata.mapper.InventoryReceiptInfoMapper.InventoryReceiptInfoResult")
public class InventoryReceiptInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 入库类型:1-采购入库
     */
    @Excel(name = "入库类型")
    private Integer receiptType;

    /**
     * 入库单编号
     */
    @Excel(name = "入库单编号")
    private String receiptNumber;

    /**
     * 入库日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入库日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiptDate;

    /**
     * 仓库id
     */
    @Excel(name = "仓库id")
    private Long warehouseId;

    /**
     * 仓库编码
     */
    @Excel(name = "仓库编码")
    private String warehouseCode;

    /**
     * 供应商id
     */
    @Excel(name = "供应商id")
    private Long supplierId;

    /**
     * 供应商编码
     */
    @Excel(name = "供应商编码")
    private String supplierCode;

    /**
     * 客户id
     */
    private Long customerId;

    /**
     * 经手人id
     */
    @Excel(name = "经手人id")
    private Long handlerId;

    /**
     * 采购单ID
     */
    @Excel(name = "采购单ID")
    private Long purchaseOrderId;

    /**
     * 采购单名编号
     */
    @Excel(name = "采购单名编号")
    private String purchaseOrderCode;
    /**
     * 采购单审核人
     */
    @Excel(name = "采购单审核人")
    private String purchaseOrderAuth;
    /**
     * 工单id
     */
    @Excel(name = "工单id")
    private Long workOrderId;
    /**
     * 工单编号
     */
    @Excel(name = "工单编号")
    private String workOrderCode;

    /**
     * 是否打印
     */
    private Integer isPrint;
    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remarks;

    /**
     * 附件信息
     */
    @Excel(name = "附件信息")
    private String attachments;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private Integer status;


    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic(value = "0", delval = "2")
    private String delFlag;

    /**
     * 版本号
     */
    @Excel(name = "版本号")
    @Version
    private Long version;

    /**
     * 入库单详情
     */
    @TableField(exist = false)
    private List<InventoryReceiptDetail> inventoryReceiptDetailList;

    /**
     * 母版入库单详情
     */
    @TableField(exist = false)
    private List<InventoryReceiptModelDetail> inventoryReceiptModelDetailList;

    @Excel(name = "创建者")
    @TableField(exist = false)
    private String createByName;

    @Excel(name = "入库仓库")
    @TableField(exist = false)
    private String warehouseName;
    /*
     * 库位名称
     */
    @Excel(name = "库位名称")
    @TableField(exist = false)
    private String warehousePositionName;

    @Excel(name = "供应商")
    @TableField(exist = false)
    private String supplierName;

    @Excel(name = "经手人")
    @TableField(exist = false)
    private String handlerName;

    /**
     * 采购单审核人
     */
    @Excel(name = "采购单审核人")
    @TableField(exist = false)
    private String purchaseOrderAuthName;

    /**
     * 采购单创建时间
     */
    @Excel(name = "采购单创建时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date purchaseOrderTime;
    /**
     * 采购单申请人
     */
    @Excel(name = "采购单申请人")
    @TableField(exist = false)
    private String purchaseOrderApplyName;
    /**
     * 预计入库数量
     */
    @Excel(name = "预计入库数量")
    @TableField(exist = false)
    private Long expectedQuantityTotal;

    /**
     * 工单完成时间
     */
    @Excel(name = "工单完成时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date workOrderFinishTime;
    /**
     * 工单申请人
     */
    @Excel(name = "工单申请人")
    @TableField(exist = false)
    private String workOrderApplyName;

    /**
     * 客户名称
     */
    private String customerName;
    /**
     * 客户编码
     */
    private String customCode;
}